namespace go commentserver

struct User{
    1:i64 ID
    2:string Name
    3:i64 FollowCount
    4:i64 FollowerCount
    5:bool IsFollow
}

struct Video{
	1:i64 ID
	2:User Author
	3:string Title
	4:string PlayUrl
	5:string CoverUrl
	6:i64 FavouriteCount
	7:i64 CommentCount
	8:bool IsFavourite
}
struct Comment{
    1:i64 ID
    2:User Creator
    3:string Content
    4:string CreateDate
}
struct CommentVideoRequest{
    1:User user
    2:i64 videoId
    3:string content
}
struct CommentVideoResponse{
    1:Comment comment
}

struct DeleteCommentRequest{
    1:User user
    2:i64 videoId
    3:i64 commentId
}
struct DeleteCommentResponse{
}


struct GetCommentListRequest{
    1:i64 userId
    2:i64 videoId
}

struct GetCommentListResponse{
    1:list<Comment> resultList
}

service CommentService {
    CommentVideoResponse CommentVideo (1:CommentVideoRequest req)
    DeleteCommentResponse DeleteComment (1:DeleteCommentRequest req)
    GetCommentListResponse GetCommentList (1:GetCommentListRequest req)
}



